package com.byzx.wine.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.byzx.wine.dao.PurchaseMapper;
import com.byzx.wine.dao.PurchaseordersubMapper;
import com.byzx.wine.dao.PurchasesubMapper;
import com.byzx.wine.dao.SyuserMapper;
import com.byzx.wine.jdbcdao.PurchaseOrderDao;
import com.byzx.wine.po.Purchaseordersub;
import com.byzx.wine.po.Syuser;
import com.byzx.wine.service.IPurchaseOrderService;
import com.byzx.wine.util.Page;
@Service
public class PurchaseOrderService implements IPurchaseOrderService {
	@Autowired 
	private PurchaseOrderDao purchaseorderdao;
	@Autowired
	private PurchaseordersubMapper purchaseordersub;
	@Autowired
	private PurchaseMapper purchase;
	@Autowired
	private PurchasesubMapper purchasesub;
	@Autowired
	private SyuserMapper syuser;
	

	@Override
	public Page<Map<String, Object>> findPage(Page<Map<String, Object>> page) {
		String sqlid = "com.byzx.wine.jdbcdao.PurchaseOrderDao.findpurchaseorder";
		return purchaseorderdao.findPage(sqlid, page);
	}
	
	
	@Override
	public List<Map<String, Object>> purchaseOrderDetail(Integer id) {
		// TODO Auto-generated method stub
		return purchaseordersub.purchaseOrderDetail(id);
	}
	
	@Override
	public List<Map<String, Object>> findAll() {
		// TODO Auto-generated method stub
		return purchase.findAll();
	}

	@Override
	public List<Map<String, Object>> purchasesubSelectwine(Integer id) {
		// TODO Auto-generated method stub
		return purchasesub.purchasesubSelectwine(id);
	}


	@Override
	public Syuser selectByColumn(Syuser record) {
		// TODO Auto-generated method stub
		return syuser.selectByColumn(record);
	}


	@Override
	public int insertSelective(Purchaseordersub record) {
		// TODO Auto-generated method stub
		return purchaseordersub.insertSelective(record);
	}
	

}
